package com.personal.mapper;

import com.personal.pojo.GoldCoin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface GoldCoinMapper {

    /**
     * 查询用户账户信息
     * @param userId
     * @return
     */
    GoldCoin getUserAccount(int userId);

    /**
     * 添加金币
     * @param userId
     * @param goldCoinBalance
     */
    void updateCoin(@Param("userId") Integer userId,@Param("goldCoinBalance") int goldCoinBalance);

    /**
     * 创建账户
     * @param id
     */
    void createAccount(Integer id);

    /**
     * 修改用户金币账户
     * @param goldCoin
     */
    Integer updateGoldCoinAccount(GoldCoin goldCoin);
}